package com.example.strategy.controller;

import com.example.strategy.service.PayService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xwj
 * @date 2021/4/28 17:17
 * description:
 */
@RestController
@RequestMapping("/xiaoniu")
public class PayController {
    @Resource(name = "payService")
    private PayService payService;

    @RequestMapping("/pay")
    public String pay(@RequestParam(name = "channel") String channel,
                      @RequestParam(name = "amount") String amount) throws Exception {
        return payService.pay(channel, amount);
    }
}
